/**  
 * @Title DiscountTypeEnum.java
 * @date 2016年4月26日 下午4:29:44
 * @Copyright (c) 2016, unibroad.com Inc. All rights reserved.
 */
package mt.model.enums;

/**
 * @Description 订单状态枚举
 * @Class mt.model.enums.DiscountTypeEnum
 * @author suan@unibroad.com
 * @version V1.0
 */
public enum RefundStatusEnum {

	CREATED(0, "已创建"),

	SUCCESS(1, "退款成功"),

	FAILURE(2, "退款失败"),

	;

	/** 业务分类名称 */
	private int code;

	/** 业务分类描述 */
	private String description;

	/**
	 * 构造函数
	 * 
	 * @param code
	 * @param description
	 */
	private RefundStatusEnum(int code, String description) {
		this.code = code;
		this.description = description;
	}

	public static RefundStatusEnum getEnumByCode(int code) {

		for (RefundStatusEnum tmpEnum : RefundStatusEnum.values()) {
			if (tmpEnum.getCode() == code) {
				return tmpEnum;
			}
		}

		return null;
	}

	/**
	 * @return the code - {返回值描述信息}.
	 */
	public int getCode() {
		return code;
	}

	/**
	 * @param code
	 *            - {参数含义描述}.
	 */
	public void setCode(int code) {
		this.code = code;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
}
